<?php
$sql = "select id,title from #__categories where published=1 and section=1 order by ordering asc, id desc";
$database->setQuery($sql);
$rows = $database->loadObjectList();
?>
<form name="frmSearchProduct" action="index.php?option=com_search&task=search" method="post">
<div class="sitebar_left_item1">
	<div class="sitebar_left_title1">Tìm sản phẩm</div>
	<div class="search_form">
		<input type="text" class="text_form" name="keyword" value="">
		<select name="catid">
			<option value="">Tất cả danh mục</option>
			<?php
			for ($i=0; $i<count($rows); $i++){
			?>
			<option value="<?php echo $rows[$i]->id;?>"><?php echo $rows[$i]->title;?></option>
			<?php
			}
			?>
		</select>
		<div class="search_dk">
			<label>Từ:</label><input type="text" name="price_from" value=""><span>VNĐ</span>
			<div class="clr-left"></div>
			<label>Đến:</label><input type="text" name="price_to" value=""><span>VNĐ</span>
			<div class="clr-left"></div>
		</div>
		<p><input type="checkbox" name="title_search" value="1"><label>Tìm kiếm theo tiêu đề</label></p>
		<input type="checkbox" name="content_search" value="1"><label>Tìm kiếm theo nội dung</label>
		<input type="submit" name="searchPro" value="Tìm kiếm" class="submit" />
		<div class="clr-left"></div>
	</div>
</div>
</form>